package com.yatop.lalmbda.ai.model;

import com.yuyaogc.lowcode.engine.annotation.Column;
import com.yuyaogc.lowcode.engine.annotation.Id;
import com.yuyaogc.lowcode.engine.annotation.Table;
import com.yuyaogc.lowcode.engine.plugin.activerecord.Model;

import java.math.BigDecimal;
import java.sql.Timestamp;

@Table(name = "ai_account", displayName = "账户")
public class Account extends Model<Account> {
    @Id
    private Long id;

    @Column(label = "账号总余额",name = "account_balance")
    private Double  accountBalance;

    @Column(label = "账户冻结余额", name = "account_frozen_balance")
    private Double accountFrozenBalance;

    @Column(label = "用户")
    private Long userId;

    @Column(label = "密钥",name = "api_key")
    private String apiKey;

    @Column(label = "创建时间",name = "create_time")
    private Timestamp createTime;

    @Column(label = "更新时间", name = "update_time")
    private Timestamp updateTime;


    public Long getId() {
        return (Long) this.get("id");
    }

    public Account setId(Long id) {
        this.set("id", id);
        return this;
    }

    public BigDecimal getAccountBalance() {
        return (BigDecimal) this.get("accountBalance");
    }

    public Account setAccountBalance(Double accountBalance) {
        this.set("accountBalance", accountBalance);
        return this;
    }

    public Double getAccountFrozenBalance() {
        return (Double) this.get("accountFrozenBalance");
    }

    public Account setAccountFrozenBalance(Double accountFrozenBalance) {
        this.set("accountFrozenBalance", accountFrozenBalance);
        return this;
    }

    public Long getUserId() {
        return (Long) this.get("userId");
    }

    public Account setUserId(Long userId) {
        this.set("userId", userId);
        return this;
    }

    public String getApiKey() {
        return (String) this.get("apiKey");
    }

    public Account setApiKey(String apiKey) {
        this.set("apiKey", apiKey);
        return this;
    }

    public Timestamp getCreateTime() {
        return (Timestamp) this.get("createTime");
    }

    public Account setCreateTime(Timestamp createTime) {
        this.set("createTime", createTime);
        return this;
    }

    public Timestamp getUpdateTime() {
        return (Timestamp) this.get("updateTime");
    }

    public Account setUpdateTime(Timestamp updateTime) {
        this.set("updateTime", updateTime);
        return this;
    }
}
